1. Field of the Invention
The present invention relates to an image generation apparatus, an image generation method and a storage medium suitable for depicting an image such as a translucent polygon.
More specifically, the present invention relates to an image generation apparatus, an image generation method and a storage medium for making rendering of a plurality of objects, under a condition that the plurality of objects displayed on a screen are not displayed overlappingly with each other.
2. Description of the Related Art
As one of prior art CG (computer graphic) techniques, there has been performed formation of a three-dimensional image using a plurality of polygons. In this kind of technique, since formation of a translucent object is useful, there is known a translucent processing technology as described, for example, in Japanese Patent Application Laying-open Nos. 10-187951 (corresponding to U.S. Ser. No. 09/142,658), 8-185543 and 9-50541. The disclosure of U.S. Ser. No. 09/142,658 is incorporated herein by reference.
FIG. 5 shows a conventional pipeline construction used for making translucent processing to polygon by the prior art. Referring to the figure, a color calculation part 50 for making translucent processing to polygon is inputted with a background reference data read for every pixel from a frame buffer 52, in addition to an image depiction data. When making translucent processing to polygon using this color calculation part 50, the background reference data for translucent processing is read in advance from the frame buffer 52 before writing of all pixel data to the frame buffer 52 is completed. Then, the value of the background reference data multiplied by a first coefficient and the value of the image depiction data multiplied by a second coefficient are summed, and the result is again written in the frame buffer 52 as a pixel data of the same address. Thus, the desired translucent processing to polygon is performed.
However, in the prior art translucent processing technology exemplified in FIG. 5, when an image depiction data of an overlapped address exists in the data under processing in the color calculation part 50, there is a problem in that a color calculation result including exact translucent processing is not obtained.
As a result, problems may occur such as unnecessary color irregularities produced in the polygon or unnatural color usage.
Further, if elimination of the above problem is attempted, an additional wait time for translucent processing is required, which is an obstacle to high-speed processing.
In particular, when a plurality of objects exist on the same screen, because it is necessary to make translucent processing successively for each object, the above problem occurs in proportion to the number of objects.
In view of the above points, an object of the present invention is to provide an image generation apparatus, an image generation method and a storage medium storing an image generation program which are possible to make exact and rapid translucent processing even with a simple construction.
In the first aspect of the present invention, there is provided an image generation apparatus for making rendering of a plurality of objects, under a condition that the plurality of objects displayed on a screen are not displayed overlappingly with each other, characterized by comprising:
first input means for taking in a first data representing a first object;
when an area to be translucent processed exists in the first object, determination means for determining whether or not the area to be translucent processed exists overlappingly for a same pixel to be processed;
when an affirmative determination is made by the determination means, second input means for taking in a second data representing a second object to form a set with the first object; and
rearrangement means for rearranging the first object and the second object so that depiction processing of the first object and the second object is performed in alternation,
wherein rendering processing is performed on the basis of the rearranged data.
Here, when a negative determination is made by the determination means, rendering processing may be immediately executed without passing through the second input means and the rearrangement means.
The determination means may perform determination according to specific information previously set for each object;
In the second aspect of the present invention, there is provided an image generation method for making rendering of a plurality of objects, under a condition that the plurality of objects displayed on a screen are not displayed overlappingly with each other, comprising:
a step for taking in a first data representing a first object;
when an area to be translucent processed exists in the first object, a step for determining whether or not the area to be translucent processed exists overlappingly for a same pixel to be processed;
when an affirmative determination is made by the determination step, a step for taking in a second data representing a second object to form a set with the first object;
a step for rearranging the first object and the second object so that depiction processing of the first object and the second object is performed in alternation, and
a step for performing rendering processing on the basis of the rearranged data.
Here, when a negative determination is made by the determination step, rendering processing may be immediately executed.
The determination step may perform determination according to specific information previously set for each object.
In the third aspect of the present invention, there is provided a computer useable medium recorded with a program for executing steps in a computer for making rendering of a plurality of objects, under a condition that the plurality of objects displayed on a screen are not displayed overlappingly with each other, the steps comprising:
a step for taking in a first data representing a first object;
when an area to be translucent processed exists in the first object, a step for determining whether or not the area to be translucent processed exists overlappingly for a same pixel to be processed;
when an affirmative determination is made by the determination step, a step for taking in a second data representing a second object to form a set with the first object;
a step for rearranging the first object and the second object so that depiction processing of the first object and the second object is performed in alternation, and
a step for performing rendering processing on the basis of the rearranged data.
In the fourth aspect of the present invention, there is provided a computer data signal embodied in a digital data stream including a program data for executing steps in a computer for making rendering of a plurality of objects, under a condition that the plurality of objects displayed on a screen are not displayed overlappingly with each other, the steps comprising:
a step for taking in a first data representing a first object;
when an area to be translucent processed exists in the first object, a step for determining whether or not the area to be translucent processed exists overlappingly for a same pixel to be processed;
when an affirmative determination is made by the determination step, a step for taking in a second data representing a second object to form a set with the first object;
step for rearranging the first object and the second object so that depiction processing of the first object and the second object is performed in alternation, and
a step for performing rendering processing on the basis of the rearranged data.
In the fifth aspect of the present invention, there is provided a computer data signal embodied in carrier wave including a program data for executing steps in a computer for making rendering of a plurality of objects, under a condition that the plurality of objects displayed on a screen are not displayed overlappingly with each other, the steps comprising:
a step for taking in a first data representing a first object;
when an area to be translucent processed exists in the first object, a step for determining whether or not the area to be translucent processed exists overlappingly for a same pixel to be processed;
when an affirmative determination is made by the determination step, a step for taking in a second data representing a second object to form a set with the first object;
a step for rearranging the first object and the second object so that depiction processing of the first and the second object is performed in alternation, and
a step for performing rendering processing on the basis of the rearranged data.
As described above, with the present invention, even by a simple construction, it is possible to provide an image generation apparatus, an image generation method and a storage medium storing an image generation program enabling exact and rapid translucent processing.
That is, with the present invention, when a depiction data of overlapping address exists in data under color calculation, the prior art problem that a color calculation result including exact translucent processing is not obtained can be prevented. Further, with the present invention, since it is not necessary to construct a more complex color calculation processing circuit, reduction of cost and processing time can be achieved.
The above and other objects, effects, features and advantages of the present invention will become more apparent from the following description of embodiments thereof taken in conjunction with the accompanying drawings.